package com.sx.pipeline.adapter

import android.widget.ImageView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.sx.pipeline.R
import com.sx.pipeline.repos.http.res.AdvertiseVO

/**
 * @Author：YY
 * @Date：2022/2/10
 * @Describe: 广告宣传列表适配器
 */
class AdvertisingAdapter(dataList: MutableList<AdvertiseVO>) : BaseQuickAdapter<AdvertiseVO, BaseViewHolder>(
    R.layout.item_advertising, dataList) {

    override fun convert(holder: BaseViewHolder, item: AdvertiseVO) {
        holder.setText(R.id.tv_title,item.title)
        val ivImage=holder.getView<ImageView>(R.id.iv_img)
        Glide.with(context).load(item.image).into(ivImage)
    }
}